package com.twotiger.and.activity.others;

import java.util.ArrayList;
import java.util.List;

import android.view.LayoutInflater;
import android.view.View;
import android.widget.ListView;
import app.twotiger.p2p.R;

import com.twotiger.and.activity.base.AbastractListItem;
import com.twotiger.and.activity.base.BaseActivity;
import com.twotiger.and.activity.base.BaseListItem;
import com.twotiger.and.activity.base.SubTitle;
import com.twotiger.and.adapter.BaseListAdapter;
import com.twotiger.and.util.StringUtils;

/**
 * 实名认证信息
 * @Description: TODO(这里描述这个类的作用) 
 * @Author douxy
 * @Date 2015年8月15日 下午2:00:34
 */
public class UserNamepage extends BaseActivity {

    private SubTitle subTitle;

    private ListView listView;

    private BaseListAdapter baseListaAdapter;

    @Override
    protected View loadViewLayout(LayoutInflater inflater) {
        View view = inflater.inflate(R.layout.user_realyinfo_layout, null);
        return view;
    }

    @Override
    protected void findViewById(View view) {
        listView = (ListView) view.findViewById(R.id.base_list);
        subTitle = new SubTitle(view) {
            @Override
            protected void clickTitle(View v) {
            }

            @Override
            protected void clickRightBtn(View v) {
            }

            @Override
            protected void cickLeftBtn(View v) {
                onBackPress();
            }
        };
        subTitle.setTitle("实名认证信息");
        subTitle.hideBtns();
        subTitle.title_left_bt.setVisibility(View.VISIBLE);
    }

    @Override
    protected void setListener() {
    }

    @Override
    protected void processLogic() {
        List<AbastractListItem> datas = new ArrayList<AbastractListItem>();
        datas.add(new BaseListItem("姓名", application.getUser().name, true, null));
        datas.add(new BaseListItem("身份证号", StringUtils.hideMidString(application.getUser().idCard, 3, 1), false, null));
        baseListaAdapter = new BaseListAdapter(this, datas);
        listView.setAdapter(baseListaAdapter);
    }

    @Override
    public void onClick(View view) {

    }

    @Override
    protected void onBackPress() {
        finish();
        overridePendingTransition(R.anim.push_right_in, R.anim.push_right_out);
    }

}
